home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet Info 1994 March
/
Internet Info CD-ROM (Walnut Creek) (March 1994).iso
/
networking
/
ip
/
slip
/
dynix
/
slip.dynix.patch
< prev
next >
Wrap
Text File
|
1991-07-12
|
3KB
|
125 lines
Diff's to if_sl.c in ftp.uu.net/networking/slip/slip.dynix.tar.Z
Courtesy of dls@mentor.cc.purdue.edu
*** if_sl.c (OLD) Mon Sep 26 15:26:21 1988
--- if_sl.c (NEW) Wed Jun 19 13:05:32 1991
***************
*** 186,192 ****
struct sockaddr *dst;
{
register struct sl_softc *sc;
! spl_t s;
/*
* `Cannot happen' (see slioctl). Someday we will extend
--- 186,192 ----
struct sockaddr *dst;
{
register struct sl_softc *sc;
! spl_t s, sipl;
/*
* `Cannot happen' (see slioctl). Someday we will extend
***************
*** 211,218 ****
--- 211,220 ----
m_freem(m);
return (EHOSTUNREACH);
}
+ sipl = IF_LOCK(&ifp->if_snd);
if (IF_QFULL(&ifp->if_snd)) {
IF_DROP(&ifp->if_snd);
+ IF_UNLOCK(&ifp->if_snd, sipl);
m_freem(m);
sc->sc_if.if_oerrors++;
printf("sl%d: output queue overflow\n", ifp->if_unit);
***************
*** 220,225 ****
--- 222,228 ----
return (ENOBUFS);
}
IF_ENQUEUE(&ifp->if_snd, m);
+ IF_UNLOCK(&ifp->if_snd, sipl);
if ((sc->sc_flags & SC_OACTIVE) == 0) {
v_lock(&sc->softc_lock, s);
slstart(sc->sc_ttyp);
***************
*** 242,248 ****
register int len;
register u_char *cp;
int flush, nd, np, n;
! spl_t s;
struct mbuf *m2;
extern int cfreecount;
--- 245,251 ----
register int len;
register u_char *cp;
int flush, nd, np, n;
! spl_t s, sipl;
struct mbuf *m2;
extern int cfreecount;
***************
*** 280,286 ****
--- 283,291 ----
/*
* Get a packet and send it to the interface.
*/
+ sipl = IF_LOCK(&sc->sc_if.if_snd);
IF_DEQUEUE(&sc->sc_if.if_snd, m);
+ IF_UNLOCK(&sc->sc_if.if_snd, sipl);
if (m == NULL) {
if (tp->t_outq.c_cc == 0)
sc->sc_flags &= ~SC_OACTIVE;
***************
*** 436,442 ****
{
register struct sl_softc *sc;
register struct mbuf *m;
! spl_t s;
l.cnt.v_ttyin++;
--- 441,447 ----
{
register struct sl_softc *sc;
register struct mbuf *m;
! spl_t s, sipl;
l.cnt.v_ttyin++;
***************
*** 485,490 ****
--- 490,496 ----
sc->sc_mp = mtod(sc->sc_mbuf, char *);
sc->sc_ilen = 0;
sc->sc_if.if_ipackets++;
+ sipl = IF_LOCK(&ipintrq);
if (IF_QFULL(&ipintrq)) {
IF_DROP(&ipintrq);
sc->sc_if.if_ierrors++;
***************
*** 494,501 ****
} else {
IF_ENQUEUE(&ipintrq, m);
v_lock(&sc->softc_lock, s);
! schednetisr(NETISR_IP);
}
return;
case FRAME_ESCAPE:
--- 500,509 ----
} else {
IF_ENQUEUE(&ipintrq, m);
v_lock(&sc->softc_lock, s);
! if (!ipintrq.ifq_busy)
! schednetisr(NETISR_IP);
}
+ IF_UNLOCK(&ipintrq, sipl);
return;
case FRAME_ESCAPE: